package org.mall.convert.order;

import org.mall.modules.order.entity.CartItemDO;
import org.mall.modules.pojo.order.bo.CalcOrderPriceBO;
import org.mall.modules.pojo.order.bo.CartItemBO;
import org.mall.modules.pojo.product.bo.ProductSkuDetailBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface CartConvert {

    CartConvert INSTANCE = Mappers.getMapper(CartConvert.class);

    CalcOrderPriceBO.Item convert(ProductSkuDetailBO sku);

    List<CartItemBO> convert(List<CartItemDO> items);

}
